package ru.javadevelop.homefinans.svc;

import com.neurospeech.wsclient.*;
import org.w3c.dom.*;

public class ArrayOfCost extends WSObject
{
	
	private java.util.Vector<Cost> _Cost = new java.util.Vector<Cost>();
	public java.util.Vector<Cost> getCost(){
		return _Cost;
	}
	public void setCost(java.util.Vector<Cost> value){
		_Cost = value;
	}
	
	public static ArrayOfCost loadFrom(Element root) throws Exception
	{
		if(WSHelper.isNull(root)){
			return null;
		}
		ArrayOfCost result = new ArrayOfCost();
		result.load(root);
		return result;
	}
	
	
	protected void load(Element root) throws Exception
	{
		NodeList list;
		int i;
		list = WSHelper.getChildren(root, "Cost");
		if(list != null)
		{
			for(i=0;i<list.getLength();i++)
			{
				Element nc = (Element)list.item(i);
				_Cost.addElement(Cost.loadFrom(nc));
			}
		}
	}
	
	
	
	public Element toXMLElement(WSHelper ws, Element root)
	{
		Element e = ws.createElement("ns4:ArrayOfCost");
		fillXML(ws,e);
		return e;
	}
	
	public void fillXML(WSHelper ws,Element e)
	{
		if(_Cost != null)
			ws.addChildArrayInline(e,"ns4:Cost",null, _Cost);
	}
	
}
